const BundleAnalyzer = require("webpack-bundle-analyzer").BundleAnalyzerPlugin

const dev = {

}

const prod = {
    plugins: [
        new BundleAnalyzer()
    ],
    externals: { // 不打包 使用cdn服务器上的资源
        vue: "Vue",
        vuex: "Vuex",
        "vue-router": "VueRouter",
        axios: "axios"
    }
}

console.log('NODE_ENV:', process.env.NODE_ENV)
if (process.env.NODE_ENV === 'production') {
    module.exports = prod
}
if (process.env.NODE_ENV === 'development') {
    module.exports = dev
}